from tkinter import *
root = Tk()
root.title("ИТ марафон")
root.geometry("500x500")
canvas = Canvas(bg="white", width=500, height=500)
canvas.pack(anchor=CENTER, expand=1)
print('Введите начальную координату X:')
X = float(input())
print('Введите начальную координату Y:')
Y = float(input())
print('Введите коэффициент увеличения N:')
N = float(input())
if N == 0 and X>=0 and X<=500 and Y>=0 and Y<=500:
    pass
elif N > 0 and 0*N+X>=0 and 0*N+Y>=0 and 20*N+X<=500 and 20*N+Y<=500:
    pass
elif N < 0 and 20*N+X>=0 and 20*N+Y>=0 and 0*N+X<=500 and 0*N+Y<=500:
     pass
else:
     print('Размер фигуры превышает максимальный размер поля')
     exit()
L = [0,0,10,0,10,10,20,10,20,30,10,30,10,20,0,20]
canvas.create_polygon(L[0] *N+X, L[1] *N+Y,
                      L[2] *N+X, L[3] *N+Y,
                      L[4] *N+X, L[5] *N+Y,
                      L[6] *N+X, L[7] *N+Y,
                      L[8] *N+X, L[9] *N+Y,
                      L[10]*N+X, L[11]*N+Y,
                      L[12]*N+X, L[13]*N+Y,
                      L[14]*N+X, L[15]*N+Y,fill='DarkBlue')
root.mainloop()
